package com.swallow.auth.application.convert.auth;

import com.swallow.auth.api.login.dto.CaptchaDTO;
import com.swallow.auth.api.login.dto.RegisterDTO;
import com.swallow.auth.domain.auth.model.AccountEntity;
import com.swallow.auth.domain.auth.model.CaptchaValObj;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

/**
 * @author: yangjie.deng@resico.cn
 * @since: 2024-05-13 11:44:12
 * @version: v1.0.0
 * @describe:
 */
@Mapper
public interface CvtAuthMapper {
    CvtAuthMapper INSTANCE = Mappers.getMapper(CvtAuthMapper.class);

    @Mappings(
            @Mapping(source = "smsCaptcha", target = "captcha")
    )
    AccountEntity register2Entity(RegisterDTO register);


    CaptchaDTO captchaVal2DTO(CaptchaValObj captchaValObj);
}
